
<?php

class login{
	public $arr_usu= array("mike");
	public $arr_pass= array("cisco");
	public $usu_s;
	public $pass_s;
	
	public function setValores(){
		$this->usu_s=$_GET['usuario'];
		$this->pass_s=$_GET['password'];		
	}
	
	public function validarLogin(){
		if(($this->arr_usu[0]==$this->usu_s) and ($this->arr_pass[0]==$this->pass_s))
			//header("location:../pag_principal.php");
			return true;
		else
			//header("location:../index.php");
			return false;
	}
}


//instancia de la clase
$instanciaClase = new login;
$instanciaClase->setValores();

$estado = $instanciaClase->validarLogin();
if ($estado)
	header("location:../pag_principal.php");
else
	header("location:../index.php");



?>